<template>
    <el-tabs v-model="activeName" @tab-click="handleClick">
        <el-tab-pane label="阅读区" name="read" v-if="hasPermission('kanke:textboox:read:list')">
            <ReadTabPane :type="activeName" v-if="activeName == 'read'" />
        </el-tab-pane>
        <el-tab-pane label="审核区" name="audit" v-if="hasPermission('kanke:textboox:read:list')">
            <ReadTabPane :type="activeName" v-if="activeName == 'audit'" />
        </el-tab-pane>
        <el-tab-pane label="模块管理" name="read_module" v-if="hasPermission('kanke:textboox:module:list')">
            <ReadModuleTabPane :type="activeName" v-if="activeName == 'read_module'" />
        </el-tab-pane>
    </el-tabs>
</template>
<script>
import { hasPermission, isShow } from '@/common/permission';
export default {
    name: "KanKeTextbookRead",
    components: {
        ReadTabPane: () => import('./components/ReadPane.vue'),
        ReadModuleTabPane: () => import('./components/ReadModulePane.vue')
    },
    data() {
        return {
            activeName: 'read'
        }
    },
    methods: {
        hasPermission,
        isShow,
        handleClick(tab, event) {
            this.activeName = tab.name
        }
    }

}
</script>
<style lang="scss" scoped></style>